﻿
@{
    Layout = "~/Views/Home/_Layout-Head.cshtml";
}
@using Models.Models
<!DOCTYPE html>

<html>
<head>
    <title>OtherUsers</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style type="text/css">
        img.wp-smiley,
        img.emoji {
            display: inline !important;
            border: none !important;
            box-shadow: none !important;
            height: 1em !important;
            width: 1em !important;
            margin: 0 .07em !important;
            vertical-align: -0.1em !important;
            background: none !important;
            padding: 0 !important;
        }
    </style>
</head>
<body>
    <!-- 模态框（Modal） -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div id="qqs">
                <p>正在转发<span id="zmicr" style="color:aqua"></span>的微博</p>
                <div class="messages" contentEditable='true'></div>
                <div class="Buts">
                    <img src="~/images/bba_thumb.gif" class='bqs' />
                    <span class='submits'>转发</span>
                    <!--face begin-->
                    <div class="faces">
                        <ul>
                            <li><img src="~/images/smilea_thumb.gif" title="[呵呵]"></li>
                            <li><img src="~/images/tootha_thumb.gif" title="[嘻嘻]"></li>
                            <li><img src="~/images/laugh.gif" title="[哈哈]"></li>
                            <li><img src="~/images/tza_thumb.gif" title="[可爱]"></li>
                            <li><img src="~/images/kl_thumb.gif" title="[可怜]"></li>
                            <li><img src="~/images/kbsa_thumb.gif" title="[挖鼻屎]"></li>
                            <li><img src="~/images/cj_thumb.gif" title="[吃惊]"></li>
                            <li><img src="~/images/shamea_thumb.gif" title="[害羞]"></li>
                            <li><img src="~/images/zy_thumb.gif" title="[挤眼]"></li>
                            <li><img src="~/images/bz_thumb.gif" title="[闭嘴]"></li>
                            <li><img src="~/images/bs2_thumb.gif" title="[鄙视]"></li>
                            <li><img src="~/images/lovea_thumb.gif" title="[爱你]"></li>
                            <li><img src="~/images/sada_thumb.gif" title="[泪]"></li>
                            <li><img src="~/images/heia_thumb.gif" title="[偷笑]"></li>
                            <li><img src="~/images/qq_thumb.gif" title="[亲亲]"></li>
                            <li><img src="~/images/sb_thumb.gif" title="[生病]"></li>
                            <li><img src="~/images/mb_thumb.gif" title="[太开心]"></li>
                            <li><img src="~/images/ldln_thumb.gif" title="[懒得理你]"></li>
                            <li><img src="~/images/yhh_thumb.gif" title="[右哼哼]"></li>
                            <li><img src="~/images/zhh_thumb.gif" title="[左哼哼]"></li>
                            <li><img src="~/images/x_thumb.gif" title="[嘘]"></li>
                            <li><img src="~/images/cry.gif" title="[衰]"></li>
                            <li><img src="~/images/wq_thumb.gif" title="[委屈]"></li>
                            <li><img src="~/images/t_thumb.gif" title="[吐]"></li>
                            <li><img src="~/images/k_thumb.gif" title="[打哈气]"></li>
                            <li><img src="~/images/bba_thumb.gif" title="[抱抱]"></li>
                            <li><img src="~/images/angrya_thumb.gif" title="[怒]"></li>
                            <li><img src="~/images/yw_thumb.gif" title="[疑问]"></li>
                            <li><img src="~/images/cza_thumb.gif" title="[馋嘴]"></li>
                            <li><img src="~/images/88_thumb.gif" title="[拜拜]"></li>
                            <li><img src="~/images/sk_thumb.gif" title="[思考]"></li>
                            <li><img src="~/images/sweata_thumb.gif" title="[汗]"></li>
                            <li><img src="~/images/sleepya_thumb.gif" title="[困]"></li>
                            <li><img src="~/images/sleepa_thumb.gif" title="[睡觉]"></li>
                            <li><img src="~/images/money_thumb.gif" title="[钱]"></li>
                            <li><img src="~/images/sw_thumb.gif" title="[失望]"></li>
                            <li><img src="~/images/cool_thumb.gif" title="[酷]"></li>
                            <li><img src="~/images/hsa_thumb.gif" title="[花心]"></li>
                            <li><img src="~/images/hatea_thumb.gif" title="[哼]"></li>
                            <li><img src="~/images/gza_thumb.gif" title="[鼓掌]"></li>
                            <li><img src="~/images/dizzya_thumb.gif" title="[晕]"></li>
                            <li><img src="~/images/bs_thumb.gif" title="[悲伤]"></li>
                            <li><img src="~/images/crazya_thumb.gif" title="[抓狂]"></li>
                            <li><img src="~/images/h_thumb.gif" title="[黑线]"></li>
                            <li><img src="~/images/yx_thumb.gif" title="[阴险]"></li>
                            <li><img src="~/images/nm_thumb.gif" title="[怒骂]"></li>
                            <li><img src="~/images/hearta_thumb.gif" title="[心]"></li>
                            <li><img src="~/images/unheart.gif" title="[伤心]"></li>
                            <li><img src="~/images/pig.gif" title="[猪头]"></li>
                            <li><img src="~/images/ok_thumb.gif" title="[ok]"></li>
                            <li><img src="~/images/ye_thumb.gif" title="[耶]"></li>
                            <li><img src="~/images/good_thumb.gif" title="[good]"></li>
                            <li><img src="~/images/no_thumb.gif" title="[不要]"></li>
                            <li><img src="~/images/z2_thumb.gif" title="[赞]"></li>
                            <li><img src="~/images/come_thumb.gif" title="[来]"></li>
                            <li><img src="~/images/sad_thumb.gif" title="[弱]"></li>
                            <li><img src="~/images/lazu_thumb.gif" title="[蜡烛]"></li>
                            <li><img src="~/images/clock_thumb.gif" title="[钟]"></li>
                            <li><img src="~/images/cake.gif" title="[蛋糕]"></li>
                            <li><img src="~/images/m_thumb.gif" title="[话筒]"></li>
                            <li><img src="~/images/weijin_thumb.gif" title="[围脖]"></li>
                            <li><img src="~/images/lxhzhuanfa_thumb.gif" title="[转发]"></li>
                            <li><img src="~/images/lxhluguo_thumb.gif" title="[路过这儿]"></li>
                            <li><img src="~/images/bofubianlian_thumb.gif" title="[bofu变脸]"></li>
                            <li><img src="~/images/gbzkun_thumb.gif" title="[gbz困]"></li>
                            <li><img src="~/images/boboshengmenqi_thumb.gif" title="[生闷气]"></li>
                            <li><img src="~/images/chn_buyaoya_thumb.gif" title="[不要啊]"></li>
                            <li><img src="~/images/daxiongleibenxiong_thumb.gif" title="[dx泪奔]"></li>
                            <li><img src="~/images/cat_yunqizhong_thumb.gif" title="[运气中]"></li>
                            <li><img src="~/images/youqian_thumb.gif" title="[有钱]"></li>
                        </ul>
                    </div>
                    <!--face end-->
                </div>
            </div>
        </div><!-- /.modal -->
    </div>

    <div style="clear: both;"></div>
    <div class="lmlblog-member-main" data="1">
        <div class="lmlblog-member-bg">
            <div class="lmlblog-member-content">
                @{
                    var data = Model as Information;
                    <!-- 个人信息 -->
                    <div class="lmlblog-member-header">
                        <div class="lmlblog-member-avatar other">
                            <img src="~/picture/@data.Photo"
                                 class="avatar" />
                        </div>
                        <div class="lmlblog-member-username">
                            <h1>@data.Nickname 的个人主页</h1>
                            <span class="lmlblog-mark lmlblog-girl"><i class="fa fa-mars"></i></span>

                        </div>

                        <div class="lmlblog-member-desc">@data.Introduce</div>

                        <div class="lmlblog-member-follow-info" id="bg">
                            @if (ViewBag.guan)
                            {
                                <span class="follow no opacity" id="guan" onclick="guan(@data.UserID)" style="background-color:cornflowerblue">
                                    已关注
                                </span>
                            }
                            else
                            {
                        <span class="follow no opacity" id="guan" onclick="guan(@data.UserID)" style="background-color:chocolate">
                            + 关注
                        </span>
                            }

                        </div>
                    </div>
                }
                <!--第二导航-->
                <div class="lmlblog-member-menu clear">


                    <li><a onclick="ind()">主页</a></li>
                    <li>动态</li>
                    <li>文章</li>
                    <li><a onclick="pers()">个人档</a></li>

                </div>

                @*第一界面*@
                <div id="homee">
                    <div class="lmlblog-member-content-list clear">
                        <div class="lmlblog-member-right">

                            <!--关注、粉丝......-->
                            <div class="lmlblog-member-left-follow clear">
                                <li>
                                    <strong>@ViewBag.atte</strong>
                                    <span>关注</span>
                                </li>
                                <li>
                                    <strong>@ViewBag.fans</strong>
                                    <span>粉丝</span>
                                </li>
                                <li>
                                    <strong>@ViewBag.like</strong>
                                    <span>喜欢</span>
                                </li>
                                <li>
                                    <strong>@ViewBag.popu</strong>
                                    <span>人气</span>
                                </li>
                            </div>
                            <!--资料简介-->
                            <div class="lmlblog-member-left-profile">
                                <h3>资料简介</h3>
                                <li><i class="fa fa-address-book-o"></i> 真实姓名：<span>@data.Name<span></li>
                                <li><i class="fa fa-transgender"></i> 性别：<span>@data.Sex<span></li>
                                <li><i class="fa fa-map-marker"></i> 城市：<span>@data.Province @data.City<span></li>
                                <li><i class="fa fa-smile-o"></i> 签名：<span>@data.Introduce<span></li>
                                <div class="lmlblog-member-left-profile-hide">
                                    <li><i class="fa fa-qq"></i> Q Q：<span>@data.QQ<span></li>
                                    <li><i class="fa fa-wechat"></i> 微信：<span>天涯路远，一剑轻安。携琪之手，相伴江湖<span></li>
                                    <li><i class="fa fa-weibo"></i> 微博：<span>司空琪吧官博<span></li>
                                    <li><i class="fa fa-clock-o"></i> 生日：<span>@data.Birthday<span></li>
                                </div>
                                <div class="lmlblog-member-left-profile-more"><a onclick="pers()">查看更多</a> <i class="fa fa-angle-right"></i></div>
                            </div>



                            <!-- 最近访客	 -->
                            <div class="lmlblog-member-left-visitor clear">
                                <h3>他的关注</h3>
                                @foreach (var item in ViewBag.Follow)
                                {
                                    <ul>
                                        <li>
                                            <a href="/Other/OtherIndex/@item.Use_UserID" title="访问时间：2天前">
                                                <span class="lmlblog-vip-icon"></span><img src="~/picture/@item.Information1.Photo" class="avatar" />
                                                <p>@item.Information1.Nickname</p>
                                            </a>
                                        </li>
                                    </ul>
                                }
                            </div>
                            <!--相关推荐-->
                            <div class="lmlblog-member-left-bg-xg clear">
                                <h3>相关推荐</h3>
                                <div id="lmlblog-memeber-bg-xg" class="aplayer"></div>
                                <a href="#" target="_blank">
                                    <h2>小四个人主页</h2>

                                    <p>　　一袭蓝衣亭亭玉立，姣若春梅绽雪，神如月射寒江，香培玉琢、英姿飒爽;其静兰生幽谷，其动若飞若扬，性格大气坚毅、疏朗开阔，举止敢爱敢恨、聪明磊落...他就是燕凌姣</p>
                                </a>
                            </div>
                        </div>


                        <div class="lmlblog-member-left">
                            <div id="show">

                            </div>
                            <!-- 换页 -->
                            <div class="lmlblog-pager">
                                <a class="lmlblog-pager-left" onclick="upppage()">上一页</a>
                                <div class="lmlblog-pager-center layui-form">
                                    <div id="index">

                                    </div>
                                </div>
                                <a class="lmlblog-pager-right" onclick="lowpage()">下一页</a>
                            </div>
                        </div>
                    </div>
                </div>
                @*第二界面*@

                <div id="personal" hidden="hidden">
                    <div class="lmlblog-member-content-list clear">
                        <ul class="nav nav-tabs" style="background-color:#e6f93e">
                            <li class="active">
                                <a href="#home" data-toggle="tab">基本信息</a>
                                @{ var info = ViewBag.Information as Models.Models.Information;}
                            </li>
                            <li>
                                <a href="#ios" data-toggle="tab">注册信息</a>
                                @{ var User = ViewBag.User as Models.Models.User;}
                            </li>
                            <li>
                                <a href="#jmeter" data-toggle="tab">学历信息</a>
                                @{ var Education = ViewBag.Education as Models.Models.Education;
                                    if (Education == null ||Education.Visible_type=="No")
                                    {
                                        Education = new Education();
                                    }
                                }

                            </li>
                            <li>
                                <a href="#ejb" data-toggle="tab">职业信息</a>
                                @{ var Occupation = ViewBag.Occupation as Models.Models.Occupation;
                                    if (Occupation == null||Occupation.Visible_type=="No")
                                    {
                                        Occupation = new Occupation();
                                    }
                                }
                            </li>
                            <li>
                                <a href="#Vis" data-toggle="tab">个性标签</a>
                            </li>
                        </ul>

                        <div id="myTabContent" class="tab-content" style="background-color:rgb(255, 255, 255)">
                            <!--基本信息-->
                            <div class="tab-pane fade in active" id="home">

                                <fieldset>
                                    <legend>资料</legend>

                                    <p>头像：<img width="150" height="150" src="~/picture/@info.Photo" /></p>
                                    <p>邮箱：@info.E_mail</p>
                                    <p>昵称：@info.Nickname</p>
                                    <p>真实姓名：@info.Name </p>
                                    <p>
                                        省份：@info.Province
                                    </p>
                                    <p>城市：@info.City</p>

                                    <p>
                                        性别：@info.Sex
                                    </p>
                                    <p> 生日：@info.Birthday</p>
                                    <p>QQ:@info.QQ</p>
                                    <p>个性签名：@info.Introduce</p>

                                </fieldset>
                            </div>
                            <!--注册信息-完成-->
                            <div class="tab-pane fade" id="ios">

                                <fieldset>
                                    <legend>注册</legend>

                                    <p>邮箱：@User.E_mail </p>
                                    <p>手机号：@User.Mobile</p>
                                    <p> 注册时间：@User.Creation</p>

                                </fieldset>


                            </div>
                            <!--学历信息-完成-->
                            <div class="tab-pane fade" id="jmeter">

                                <fieldset>
                                    <legend>学历</legend>

                                    <p>学校类型：@Education.School_type</p>
                                    <p>学校名称：@Education.School_name</p>
                                    <p> 系部名称：@Education.Department </p>
                                </fieldset>


                            </div>
                            <!--职业信息-完成-->
                            <div class="tab-pane fade" id="ejb">

                                <legend>职业</legend>

                                <p>
                                    省份：@Occupation.Province
                                </p>
                                <p>      城市：@Occupation.City</p>

                                <p>公司名称：@Occupation.Company_name</p>
                                <p>开始年份：@Occupation.Start_year</p>
                                <p>结束年份：@Occupation.End_year</p>
                                <p>
                                    职位:@Occupation.Position
                                </p>


                            </div>
                            <!--个性标签-->
                            <div class="tab-pane fade" id="Vis">

                                <fieldset>
                                    <legend>个性标签</legend>
                                    <p>标签内容：</p>
                                    @foreach (var item in ViewBag.Personality)
                                    {
                                        <p>@item.Label</p>
                                    } <hr />

                                </fieldset>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            
        </div>
    </div>
    <script>
        function pers() {
            $("#homee").hide();
            $("#personal").show();
        }
        function ind() {
            $("#personal").hide();
            $("#homee").show();

        }
    </script>
    <script>
        var size = 3;
        var index = 1;
        var id =@data.UserID;
        var sumwb =@ViewBag.SumWB;
        var totalPage = parseInt(sumwb % size == 0 ? sumwb / size : sumwb / size + 1);
        $(function () {

            showpage(size,index,id);
        })
        function upppage() {
            if (index == 1) {
                return alert("当前页是首页！");
            }
            index = index - 1;
            showpage(size, index, id);
            $("#index").empty();
            $("#index").append("第" + index + "页");
        }
        function lowpage() {
            if (index == totalPage) {
                return alert("当前已经是最后一页了！");
            }
            index = index + 1;
            showpage(size, index, id);
            $("#index").empty();
            $("#index").append("第" + index + "页");
        }
        function showpage(size, index, id) {
            $("#index").empty();
            $("#index").append("第" + index + "页");
            $.ajax({
                type: "get",
                url: "/My_home/GetMBlogpage",
                data: { size: size, index: index, id: id },
                success: function (data) {
                    $("#show").empty();
                    var idx = 1;
                    $.each(data, function (key, val) {
                        var show;
                        if (val.Fw.length > 0) {
                            show = `<div class="lmlblog-post-list">
                            <div class="lmlblog-posts-list words" style="background-color:antiquewhite;background-image:url(/images/058.png); "
                            data="4197">
                            <!-- 动态内容部分，包括列表 -->
                            <div class="lmlblog-post-user-info">
                            <div class="lmlblog-post-user-info-avatar" user-data="1">
                            <a href="/Other/OtherIndex/` + val.UserID + `" style="display: inline-block;">
                            <img src="/picture/` + val.Photo + `" class="avatar" />
                            </a>
                            </div>
                            <div class="lmlblog-post-user-info-name">
                            <a href="/Other/OtherIndex/`+ val.UserID + `">
                            <font style="color:#333;font-weight:600">` + val.Nickname + `</font>
                            </a>
                            </div>
                            <div class="lmlblog-post-user-info-time">` + val.Release_time + `<br>转发来自：` + val.Fw[0].Nickname + `</div>
                            </div>
                            <!-- 作者信息 -->
                            <div class="lmlblog-post-content">
                            <a class="post_list_link" href="#">` + val.Content + `</a>
                            </div><div class="lmlblog-posts-list words" style="background-image:url(images/058.png); " data="4197">
                                    <!-- 动态内容部分，包括列表 -->
                                    <div class="lmlblog-post-user-info">
                                        <div class="lmlblog-post-user-info-avatar" user-data="1">
                                            <a href="Other/OtherIndex/`+ val.Fw[0].UserID + `" style="display: inline-block;">
                                                <img src="/picture/` + val.Fw[0].Photo + `" class="avatar"></a></div>
                                            <div class="lmlblog-post-user-info-name">
                                                <a href="Other/OtherIndex/`+ val.Fw.UserID + `">
                                                    <font style="color:#333;font-weight:600">` + val.Fw[0].Nickname + `</font>
                                                </a>
                                            </div>
                                            <div class="lmlblog-post-user-info-time">` + val.Fw[0].Release_time + `</div>
                                        </div>
                                        <!-- 作者信息 -->
                                         <div class="lmlblog-post-content">
                                         <a class="post_list_link" href="#">` + val.Fw[0].Content + `</a></div>
                                            <div class="lmlblog-post-images-list clear">`;
                            if (val.Fw[0].WB_pic != null) {
                                $.each(val.Fw[0].WB_pic, function (key2, img) {
                                    show += `<a href="/images/` + img.URL + `" data-fancybox="gallery"
                                    data-caption='<i class="fa fa-copyright" ></i>  lmlblog' >
                                    <img src="/images/`+ img.URL + `"  width="150" height="200" style="margin-right:20px" alt="司空琪吧十一月壁纸" /></a>`;
                                })
                            }
                            show += `</div ></div><div class="lmlblog-post-bar">
                            <ul><li>
                            <a  onclick="getmbid(`+ val.MbID + `,` + val.UserID + `)" data-toggle="modal" data-target="#myModal">
                            <img src="/picture/转发.png" width="20" height="20"  />转发 <span>` + val.Forward + `</span>
                            </a>
                            </li>
                            <li>
                            <a onclick="zan(`+ val.MbID + `,` + idx + `)">
                            <img src = "/picture/点赞.png" width = "20" height = "20" /> 点赞 <span id="zan` + idx + `"> ` + val.Likes + `</span></a>
                            </li>
                            <li>
                            <a data-ajax="true" onclick="(downup(`+ idx + `))" id="DownUp` + idx + `" data-ajax-method="get" data-ajax-mode="replace" data-ajax-update="#ShowComm` + idx + `" href="/Home/ShowComm?MbID=` + val.MbID + `">
                            <img src="/picture/评论.png" width="20" height="20" />评论 <span>` + val.Comment.length + `</span>
                             </a>
                            </li>
                            </ul>
                            </div>
                            <div id="ShowComm`+ idx + `"></div >
                            <div class="lmlblog-post-footer-bar">' +
                            <span title="` + val.Release_time + `">` + val.Release_time + `</span>
                            <span>电脑端</span><i class="lmlblog-icon"
                            onclick="lmlblog_post_type_open();">&#xe62c;</i>
                            </div></div></div>`;
                        } else {
                            show = `<div class="lmlblog-post-list">
                            <div class="lmlblog-posts-list words" style="background-image:url(/images/058.png); "
                            data="4197">
                            <!-- 动态内容部分，包括列表 -->
                            <div class="lmlblog-post-user-info">
                            <div class="lmlblog-post-user-info-avatar" user-data="1">
                            <a href="/Other/OtherIndex/` + val.UserID + `" style="display: inline-block;">
                            <img src="/picture/` + val.Photo + `" class="avatar" />
                            </a>
                            </div>
                            <div class="lmlblog-post-user-info-name">
                            <a href="/Other/OtherIndex/`+ val.UserID + `">
                            <font style="color:#333;font-weight:600">` + val.Nickname + `</font>
                            </a>
                            </div>
                            <div class="lmlblog-post-user-info-time">` + val.Release_time + `</div>
                            </div>
                            <!-- 作者信息 -->
                            <div class="lmlblog-post-content">
                            <a class="post_list_link" href="#">` + val.Content + `</a>
                            </div> <div class="lmlblog-post-images-list clear">`;
                            if (val.WB_pic != null) {
                                $.each(val.WB_pic, function (key2, img) {
                                    show += `<a href="/images/` + img.URL + `" data-fancybox="gallery"
                                    data-caption='<i class="fa fa-copyright" ></i>  lmlblog' >
                                    <img src="/images/`+ img.URL + `"  width="150" height="200" style="margin-right:20px" alt="司空琪吧十一月壁纸" /></a>`;
                                })
                            }
                            show += `</div ><div class="lmlblog-post-bar">
                            <ul><li>
                            <a  onclick="getmbid(`+ val.MbID + `,` + val.UserID + `)" data-toggle="modal" data-target="#myModal">
                            <img src="/picture/转发.png" width="20" height="20"  />转发 <span>` + val.Forward + `</span>
                            </a>
                            </li>
                            <li>
                            <a onclick="zan(`+ val.MbID + `,` + idx + `)">
                            <img src = "/picture/点赞.png" width = "20" height = "20" /> 点赞 <span id="zan` + idx + `"> ` + val.Likes + `</span></a>
                            </li>
                            <li>
                            <a data-ajax="true" onclick="(downup(`+ idx + `))" id="DownUp` + idx + `" data-ajax-method="get" data-ajax-mode="replace" data-ajax-update="#ShowComm` + idx + `" href="/Home/ShowComm?MbID=` + val.MbID + `">
                            <img src="/picture/评论.png" width="20" height="20" />评论 <span>` + val.Comment.length + `</span>
                             </a>
                            </li>
                            </ul>
                            </div>
                            <div id="ShowComm`+ idx + `"></div >
                            <div class="lmlblog-post-footer-bar">' +
                            <span title="` + val.Release_time + `">` + val.Release_time + `</span>
                            <span>电脑端</span><i class="lmlblog-icon"
                            onclick="lmlblog_post_type_open();">&#xe62c;</i>
                            </div></div></div></div>`;
                        }
                        $("#show").append(show);
                        idx = idx + 1;
                    })
                },
                error: function (err) {
                    console.log(err.responseText);
                }
            })
        }
        //点赞
        function zan(Mbid, idx) {
            var dz = $("#zan" + idx);
            $.ajax({
                type: "get",
                url: "/Home/Fabulous?Mbid=" + Mbid,
                success: function (dal) {
                    if (dal == 1) {
                        var za = parseInt(dz.text());
                        dz.empty();
                        dz.text(za + 1);
                    }
                    else if (dal == 0) {
                        var za = parseInt(dz.text());
                        dz.empty();
                        dz.text(za - 1);
                    }
                },
                error: function (err) {
                    console.log(err.responseText);
                }
            })
        };
        var k = 1;
        function downup(idx) {
            if (k % 2 == 0) {
                shou(idx);
            } else {
                xian(idx);
            }
        };
        function shou(idx) {
            k = k - 1;
            $("#ShowComm" + idx).empty();
            $("#DownUp" + idx).attr('data-ajax-update', '');
        }
        function xian(idx) {
            k = k + 1;
            $("#DownUp" + idx).attr('data-ajax-update', '#ShowComm' + idx);
        };
    </script>
    @*关注*@
    <script>
        function guan(uid) {
            $.ajax({
                type: "get",
                url: "/Other/Follow?Mbid=" + uid,
                success: function (dal) {
                    console.log(dal);
                    if (dal == 1) {
                        $("#guan").empty();
                        $("#follow no opacity").animate({
                            backgroundColor: "#abcdef"
                        }, 1500);
                        $("#guan").css("background-color", "cornflowerblue");
                        $("#guan").text("√ 已关注");
                    }
                    else if (dal == 0) {
                        $("#guan").empty();
                        $("#guan").css("background-color", "chocolate");
                        $("#guan").text("+ 关注");
                    }
                },
                error: function (err) {
                    console.log(err.responseText);
                }
            })
        }
    </script>
    <script src="~/js/jquery-1.10.2.min.js"></script>
    @*转发*@
    <script type="text/javascript">
        //点击小图片，显示表情
        $("body").on('click', '.bqs', function (e) {
            $(".faces").slideDown(); //慢慢向下展开
            e.stopPropagation(); //阻止冒泡事件
        });
        //在桌面任意地方点击，关闭表情框
        $("body").on('click', document, function () {
            $(".faces").slideUp(); //慢慢向上收
        });
        //点击小图标时，添加功能
        $("body").on('click', '.faces ul li', function () {
            let simg = $(this).find("img").clone();
            $(".messages").append(simg); //将表情添加到输入框
        });
        //点击发表按扭，转发该条微博
        $("body").on('click', 'span.submits', function () {
            var txt = $(".messages").html(); //获取输入框内容
            if (txt.length < 1) {
                $('.messages').focus(); //自动获取焦点
                return;
            }
            $.ajax({
                type: "post",
                url: "/Home/AddFwmb",
                data: { mbid: zmbid, result: txt },
                success: function (data) {
                    if (data.bl == true) {
                        $('.messages').html(''); // 清空输入框
                        showpage(3, 1);
                    } else {
                        console.log("转发失败");
                    }
                },
                error: function (err) {
                    console.log(err);
                }
            })
        });
        var zmbid = 0;
        function getmbid(mbid, rid) {
            console.log(rid);
            zmbid = mbid;
            $.ajax({
                type: "get",
                url: "/Home/ZMric?rid=" + rid,
                success: function (data) {
                    $("#zmicr").text(data);
                }
            })
        }
    </script>
    @*回复*@
    <script type="text/javascript">
        //点击小图片，显示表情
        $("body").on('click', '.bq', function (e) {
            $(".face").slideDown(); //慢慢向下展开
            e.stopPropagation(); //阻止冒泡事件
        });
        //在桌面任意地方点击，关闭表情框
        $("body").on('click', document, function () {
            $(".face").slideUp(); //慢慢向上收
        });
        //点击小图标时，添加功能
        $("body").on('click', '.face ul li', function () {
            let simg = $(this).find("img").clone();
            $(".message").append(simg); //将表情添加到输入框
        });
        var reid = null;
        //点击发表按扭,评论该条微博
        $("body").on('click', 'span.submit', function () {
            var txt = $(".message").html(); //获取输入框内容
            if (txt.length < 1) {
                $('.message').focus(); //自动获取焦点
                return;
            }
            var mbid = $(".submit").attr("id");
            $.ajax({
                type: "post",
                url: "/Home/AddComm",
                data: { mbid: mbid, result: txt, rid: reid },
                success: function (data) {
                    $('.message').html(''); // 清空输入框
                    alert(data);

                },
                error: function (err) {
                    console.log(err);
                }
            })
        });

        //回复评论
        function huiComm(rid, uid) {
            reid = rid;
            $.ajax({
                type: "get",
                url: "/Home/HuiComm",
                data: { rid: rid, uid: uid },
                success: function (data) {
                    $('.message').html(data);
                }
            })
        }
        //删除当前数据
        function delComm(commid) {
            $.ajax({
                type: "get",
                url: "/Home/DelComm?commid=" + commid,
                success: function (data) {
                    alert(data);
                },
                error: function (err) {
                    console.log(err);
                }
            })
        }
    </script>
</body>
</html>
